package com.ruoyi.system.domain;

import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 *  审核记录对象 audit_record
 * 
 * @author ruoyi
 * @date 2025-11-08
 */
@TableName("audit_record")
public class AuditRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long auditRecordId;

    /** 路径id */
    @Excel(name = "路径id")
    private Long auditRouteId;

    private Long businessId;
    public void setBusinessId(Long businessId) {
        this.businessId = businessId;
    }
    public Long getBusinessId() {
        return businessId;
    }


    private String auditBusinessType;
    public void setAuditBusinessType(String auditBusinessType) {
        this.auditBusinessType = auditBusinessType;
    }
    public String getAuditBusinessType() {
        return auditBusinessType;
    }


    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long auditAssigneeId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long userId;

    /** 审核结果，取字典 */
    @Excel(name = "审核结果，取字典")
    private String auditResult;

    /** 不通过原因，驳回或则拒绝时填写 */
    @Excel(name = "不通过原因，驳回或则拒绝时填写")
    private String nopassReason;

    /** 回退节点，驳回时必填 */
    @Excel(name = "回退路径，驳回时必填")
    private Long rollbackRouteId;

    public void setAuditRecordId(Long auditRecordId)
    {
        this.auditRecordId = auditRecordId;
    }

    public Long getAuditRecordId()
    {
        return auditRecordId;
    }

    public void setAuditRouteId(Long auditRouteId) 
    {
        this.auditRouteId = auditRouteId;
    }

    public Long getAuditRouteId() 
    {
        return auditRouteId;
    }

    public void setAuditAssigneeId(Long auditAssigneeId) 
    {
        this.auditAssigneeId = auditAssigneeId;
    }

    public Long getAuditAssigneeId() 
    {
        return auditAssigneeId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setAuditResult(String auditResult) 
    {
        this.auditResult = auditResult;
    }

    public String getAuditResult() 
    {
        return auditResult;
    }

    public void setNopassReason(String nopassReason) 
    {
        this.nopassReason = nopassReason;
    }

    public String getNopassReason() 
    {
        return nopassReason;
    }

    public void setRollbackRouteId(Long rollbackRouteId)
    {
        this.rollbackRouteId = rollbackRouteId;
    }

    public Long getRollbackRouteId()
    {
        return rollbackRouteId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("auditRecordId", getAuditRecordId())
            .append("auditRouteId", getAuditRouteId())
            .append("auditAssigneeId", getAuditAssigneeId())
            .append("userId", getUserId())
            .append("auditResult", getAuditResult())
            .append("nopassReason", getNopassReason())
            .append("rollbackRouteId", getRollbackRouteId())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    /**
     * 节点审批人名称
     */
    @TableField(exist = false)
    private String userName;
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 节点审批记录
     */
    @TableField(exist = false)
    private List<AuditRecord> auditRecordList;

    @TableField(exist = false)
    private String rollbackRoleName;
    public String getRollbackRoleName() {
        return rollbackRoleName;
    }
    public void setRollbackRoleName(String rollbackRoleName) {
        this.rollbackRoleName = rollbackRoleName;
    }
}
